﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace CjcPhotoPrint
{
	class TransformConverter : IValueConverter
	{
		public TransformBase SelectedTransform { get; set; }

		#region IValueConverter Members

		public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
		{
			var image = value as EditableImage;

			return ( image != null && SelectedTransform != null )
				? image.ApplyTransforms( SelectedTransform )
				: image.Transform;
		}

		public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
		{
			throw new NotImplementedException();
		}

		#endregion
	}
}